<?php

namespace App\Http\Controllers\System;
use App\Http\Controllers\Controller;
use App\Models\System\SystemSettingModel;
use Illuminate\Http\Request;
use App\Http\Controllers\PCHController;


class SystemSettingController extends Controller
{

    public function initApp(Request $request)
    {
        $input = $request->all();
//        if (empty($input['app_latest_version_android'])&&empty($input['app_latest_version_ios'])){
//            return self::response(null,'-1','版本号不能为空');
//        }

        $data = SystemSettingModel::getSystemSetting();

//        if (isset($input['app_latest_version_android'])&&$input['app_latest_version_android'] < $data['SystemSetting']['app_latest_version_android']){
//            return self::response($data,PCHController::$AndroidVersionOld,'有新的版本，是否前往下载');
//        }
//
//        if (isset($input['app_latest_version_ios'])&&$input['app_latest_version_ios'] < $data['SystemSetting']['app_latest_version_ios']){
//            return self::response($data,PCHController::$AndroidVersionOld,'有新的版本，是否前往下载');
//        }

        return self::response($data,200);
    }
}
